<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>eeeeeeee</title>
</head>
<body>
    
    <script>
        var arr =[10,91,12,83,41]
        function sorry(arrys)
        {
          
               var p;
               for(var i=1;i<=arrys.length-1;i++)
               {
                
                     for(var j=0;j<arrys.length-1;j++)
                     {
                         if(arrys[j]<arrys[j+1])
                         {
                             p=arrys[j];
                             arrys[j]=arrys[j+1];
                             arrys[j+1]=p;
                         }
                     }  
   

               }
               return arrys;

        }
         console.log(sorry(arr));
         alert(arr)
    </script>
</body>
</html>